<template>
  <div class="marketing" :style="defaultHeight">
    <MainTop>
      <span slot="title">{{name}}</span>
      <p slot="content">{{content}}</p>
    </MainTop>
    <div class="centent">
        
    </div>
  </div>
</template>

<script>

import MainTop from '@/components/mainTop.vue'
export default {
  name: 'marketing',
  components: {
    MainTop,
  },
  data() {
      return{
        name: '开通营销工具',
        content: '营销工具可支持创建活动，并自动生成对应的中间页，可在从短信、邮件、微信 H5、微信外部 H5 调起小程序特定页面，活动下发后可更新配置并实时生效',
        defaultHeight: {
        height: ""
        },
      }
  },

   methods: {
    //定义方法，获取高度减去头尾
    getHeight() {
      this.defaultHeight.height = window.innerHeight - 100 + "px";
    }
  },

  created() {
    //页面创建时执行一次getHeight进行赋值，顺道绑定resize事件
    window.addEventListener("resize", this.getHeight);
    this.getHeight();
  }
}
</script>

<style lang="less" scoped>
.marketing{
  width: 100%;
  background-color: #f0f2f5;
}
.title{
  padding: 30px;
  background-color: #fff;
  span{
    font-size: 28px;
    font-weight: 800 !important;
  }
}
.centent{
  margin: 35px;
  padding: 30px;
  background-color: #fff;
}
</style>
